# -*- coding: utf-8 -*-
from odoo import models, api, fields, tools
from odoo.exceptions import UserError
import re


class project_temp(models.Model):

    _name = "proman.project_temp"
    _description = "项目模板"
    _table = "proman_project_temp"
    _order = "sequence"

    sequence = fields.Integer(string="排序",translate = 0)
    name = fields.Char(string="名称",help = '请输入名称',required = 1,translate = 0)
    project_id = fields.Many2one(string="项目名称",comodel_name = 'proman.project_base',translate = 0)
    company_id = fields.Many2one(string="所属公司",comodel_name = 'res.company',default = lambda self:self.env.company,required = 1,translate = 0)
    project_temp_funds = fields.One2many(string="资金模板",comodel_name = 'proman.project_temp_fund',inverse_name = 'main_id',translate = 0)
    project_temp_tasks = fields.One2many(string="任务模板",comodel_name = 'proman.project_temp_task',inverse_name = 'main_id',translate = 0)
    project_temp_indicators = fields.One2many(string="绩效模板",comodel_name = 'proman.project_temp_indicator',inverse_name = 'main_id',translate = 0)
    memo = fields.Html(string="备注说明",translate = 0)
